import apiClient from './index';

const authService = {
  login: (credentials) => {
    return apiClient.post('/users/login', credentials);
  },

  register: (userData) => {
    return apiClient.post('/users/register', userData);
  },

  getCurrentUser: () => {
    return apiClient.get('/users/profile');
  },

  updateProfile: (profileData) => {
    return apiClient.put('/users/profile', profileData);
  },

  changePassword: (passwordData) => {
    return apiClient.put('/users/profile/password', passwordData);
  },
  
  // 如果有登出接口，可以在这里添加
  // logout: () => {
  //   return apiClient.post('/users/logout'); // 假设有登出接口
  // }
};

export default authService; 